<template>
  <basic-container>
    <customer-list-list v-show="showType==='list'" @detail="handleDetail"/>
    <customer-detail-content v-if="showType==='detail'" :customer="currRow" @handleBack="handleBack"/>
  </basic-container>
</template>

<script>
import customerListList from "@/views/customer/compontents/customer-list-list.vue";
import CustomerDetailContent
  from "@/views/customer/compontents/customer-detail-content";
export default {
  name: "index",
  components: {CustomerDetailContent, customerListList},
  data() {
    return {
      showType: 'list',
      currRow: {}
    }
  },
  methods:{
    handleBack(list){
      console.log('back3')
      this.showType =list
      console.log(this.showType)
    },
    handleDetail(row) {
      this.currRow = row
      this.showType = 'detail'
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
